package org.nbict.iot.trident.mogo.mapper;

import org.apache.storm.tuple.ITuple;
import org.bson.Document;
import org.bson.conversions.Bson;

import java.io.Serializable;

/**
 * Created by songseven on 18/6/25.
 */
public interface MongoMapper  extends Serializable {
    /**
     * 转换文档
     * @param var1
     * @return
     */
    Document toDocument(ITuple var1);

    /**
     * 获取查询条件
     * @param tuple
     * @return
     */
    Bson filter(ITuple tuple);
}
